package main

import (
	"fmt"
	"net/http"
	"store-server/handler"
)

func main() {
	//路由
	http.HandleFunc("/file/upload", handler.UploadHandler)
	http.HandleFunc("/file/upload/suc", handler.UploadSucHandler)
	http.HandleFunc("/file/meta", handler.GetFileMetaHandler)
	http.HandleFunc("/file/query", handler.FileQueryHandler)
	http.HandleFunc("/file/download", handler.DownLoadHander)
	http.HandleFunc("/file/update", handler.FileMetaUpdateHandler)
	http.HandleFunc("/file/delete", handler.FileDeleteHandler)
	//监听
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		fmt.Println("server start error!")
	}
}
